from django.db import models

# Create your models here.
class User2(models.Model):
    id = models.AutoField(primary_key=True)
    userid = models.CharField(max_length=12)
    password = models.CharField(max_length=15)
    status = models.CharField(max_length=15,null=True)
    def __str__(self):
        # 在Python3中使用 def __str__(self):
        return self.userid
    def __str__(self):
        # 在Python3中使用 def __str__(self):
        return self.password
    def __str__(self):
        # 在Python3中使用 def __str__(self):
        return self.status

class Student(models.Model):
    Sid = models.CharField(max_length=12,primary_key=True)
    Sname = models.CharField(max_length=12)
    Sage = models.CharField(max_length=6)
    Ssex = models.CharField(max_length=6)
    Sdept = models.CharField(max_length=10)
    Stel = models.CharField(max_length=11)

    def __str__(self):
        return self.Sid

    def __str__(self):
        return self.Sname

    def __str__(self):
        return self.Sage

    def __str__(self):
        return self.Ssex
    
    def __str__(self):
        return self.Sdept

    def __str__(self):
        return self.Stel



class Course(models.Model):
    Cid = models.CharField(max_length=12,primary_key=True)
    Cname = models.CharField(max_length=12)
    Ccredit = models.CharField(max_length=6)

    def __str__(self):
        return self.Cid

    def __str__(self):
        return self.Cname

    def __str__(self):
        return self.Ccredit

class SC(models.Model):
    Sid = models.CharField(max_length=12)
    Cid = models.CharField(max_length=12)
    grade = models.CharField(max_length=6)

    def __str__(self):
        return self.Cid

    def __str__(self):
        return self.Sid

    def __str__(self):
        return self.grade
